/*
 * @Descripttion:
 * @version:
 * @Author: sueRimn
 * @Date: 2025-06-07 11:44:57
 * @LastEditors: sueRimn
 * @LastEditTime: 2025-07-30 21:50:23
 */
#ifndef _TASK_H
#define _TASK_H

#include "stm32f4xx_hal.h"

void loop_task_run(void);

typedef struct _task_delay
{
    uint32_t uiTaskStartTime;//任务开始时间
    uint32_t uiTaskDelayTime;//任务延时时间

    void (*task_callback)(void *param);//任务回调函数
    void *param;

    struct _task_delay* pstNextTask;

}task_delay;


typedef task_delay* task_delay_t;

void loop_task_init(void);
void delay_task_init(void);
void delay_task_test(void);

task_delay_t delay_task_regist(uint32_t uiTaskDelayTime, void (*task_callback)(void *param), void *param);
void delay_task_add_run_list(task_delay_t pstAddTaskNode);

#endif